
package utils;

import utils.dataaccess.DBInterface;


public class ValidationManager {
    public static  boolean isEmail(String email){
        return email.matches("^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
    }
    
    public static  boolean isRegisteredUser(String username){
        return DBInterface.isRegistered(username);

    }
    
    public static boolean passwordAccepted(String password, String acception){
        return password.equals(acception);
    }
}
